package com.ytjj.qmyx.admin.shiro;

import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.UnknownSessionException;
import org.crazycake.shiro.RedisSessionDAO;

import java.io.Serializable;

/**
 * shiro redisdao实现
 *
 */
@Slf4j
public class AdminRedisSessionDAO extends RedisSessionDAO {
    @Override
    protected Session doReadSession(Serializable sessionId) {
        log.debug("doReadSession,sessionId={}",sessionId);
        return super.doReadSession(sessionId);
    }

    @Override
    public void update(Session session) throws UnknownSessionException {
        log.debug("update,sessionId={}",session.getId());
        super.update(session);
    }

    @Override
    protected Serializable doCreate(Session session) {
        return super.doCreate(session);
    }
}
